package patterns.actions.visitor;

import java.util.ArrayList;
import java.util.Collection;

public class visitorTest {

	private static Collection setCollection(){
		Collection list = new ArrayList();
		list.add(new visitableString("String 1"));
		list.add(new visitableString("String 2"));
		list.add(new visitableFloat(new Float(12)));
		list.add(new visitableString("String 3"));
		return list;
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Visitors visitor = new visitorImp();
		Visitors visitor2=new visitorImp2();
		
		visitableString vs = new visitableString("I am a String");
		visitor.VisitorString(vs);
		
		Collection list=setCollection();
		visitor.VisitorCollection(list);
		System.out.println("======");
		visitor2.VisitorCollection(list);

	}

}
